{include app:admin.inc.header}
<!--tmpl-resource-->
{include app:admin.inc.top}


<div class="container-fluid content-body">
	<div class="main">
		<!-- left side start-->

		<section class="left-section">
			<dl id="leftNav" data-type="setting">
				<dt><i class="glyphicon glyphicon-wrench"></i> 网站设置</dt>
				{if in_case_array('admin/setting',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/setting/index}">站点设置</a></dd>
				{/if}
				{if in_case_array('admin/nav',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/nav/index}">导航设置</a></dd>
				{/if}
				{if in_case_array('admin/friendLink',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/friendLink/index}">友情链接</a></dd>
				{/if}
				{if in_case_array('admin/remind',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/remind/index}">站内提醒</a></dd>
				{/if}
				{if in_case_array('admin/remindSms',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/remindSms/index}">短信提醒</a></dd>
				{/if}
				{if in_case_array('admin/security',$priv) || empty($priv)}
				<dd><a class="mb active" href="{url /admin/security/index}">安全中心</a></dd>
				{/if}
				{if in_case_array('admin/remind',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/message/index}">消息中心</a></dd>
				{/if}
				{if in_case_array('admin/loginlog',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/LoginLog/index}">登录日志</a></dd>
				{/if}
				{if in_case_array('admin/operationlog',$priv) || empty($priv)}
				<dd><a class="mbh" href="{url /admin/operationLog/index}">操作日志</a></dd>
				{/if}
			</dl>
		</section>

		<!-- left side end-->


		<!-- main content start-->
		<section class="right-section" id="right-section">
			{include admin.inc.bread}
			<h2 class="header">{$title}</h2>
			<!-- start of inner-frame -->
			<div class="inner-iframe">

				<div class="inner-container">
					<form role="form" class="form-horizontal basicForm content-add-form" id="content-add-form" autocomplete="off">

						<div class="form-group">
							<label class="col-sm-2 control-label">登录超时(分钟)</label>
							<div class="col-sm-4">
								<input type="input" name="data[sessionExpr]" data-size="normal"  class="form-control" value="{$configs[sessionExpr]}">
							</div>
							<div class="col-sm-4">
								(登陆后该时间段内无操作，系统自动退出账号登陆状态)
							</div>
						</div>
						<!-- switch -->
						<div class="form-group">
							<label class="col-sm-2 control-label">用户登录验证码</label>
							<div class="col-sm-4">
								<label class="css-switch">
									<input type="checkbox" id="switch-status-verifyCode" name="data[verifyCode]" data-size="normal" {if $configs[verifyCode] == 'on'}checked{/if} data-on-text="开启" data-off-text="关闭">
									<span></span>
								</label>

							</div>
							<div class="col-sm-4">
								(账号登陆时是否启用验证码机制)
							</div>
						</div>
						
						<div class="form-group">
							<label class="col-sm-2 control-label">用户帐号登录限制</label>
							<div class="col-sm-4">
								<label class="css-switch">
									<input type="checkbox" id="switch-status-onePointLogin" name="data[onePointLogin]" data-size="normal" {if $configs[onePointLogin] == 'on'}checked{/if} data-on-text="开启" data-off-text="关闭">
									<span></span>
								</label>

							</div>
							<div class="col-sm-4">
								(禁止同一账号多IP同时在线)
							</div>
						</div>

						<p class="help-block"></p>


						<div class="form-group" id="box-admin_role">
							<label class="col-sm-2 control-label">禁止登录网站ip</label>
							<div class="input-group col-sm-4" style="padding-right: 15px;padding-left: 15px;">
								<input type="input" class="form-control" name="ip" id="denyIp" >
								<span class="input-group-btn">
									<input type="button" class="btn btn-default" value="添加" id="addIp">
								</span>
							</div>
							<label class="col-sm-2 control-label"></label>
							<div class="col-sm-4">
							  <ul class="assocul" id="iplist" >
							  	{loop $configs[denyLoginIp] $v}
							  	<li><input type="hidden" name="data[denyLoginIp][]" value="{$v}">{$v}<i class="glyphicon-remove glyphicon pull-right"></i></li>
							  	{/loop}
							  </ul>
							</div>
							<div class="col-sm-4">
								(设置的IP不能访问网站)
							</div>
						</div>
			
						<div class="form-group" id="box-admin_role">
							<label class="col-sm-2 control-label">违禁词</label>
							<div class="input-group col-sm-4" style="padding-right: 15px;padding-left: 15px;">
								<input type="input" class="form-control" name="word" id="denyWord" >
								<span class="input-group-btn">
									<input type="button" class="btn btn-default" value="添加" id="addWord">
								</span>
							</div>

							<label class="col-sm-2 control-label"></label>
							<div class="col-sm-4">

							   <ul class="assocul" id="wordlist">
							   	{loop $configs[prohibitedWords] $v}
							   	<li><input type="hidden" name="data[prohibitedWords][]" value="{$v}">{$v}<i class="glyphicon-remove glyphicon pull-right"></i></li>
							   	{/loop}
							   </ul>
							</div>
							<div class="col-sm-4">
								(网站禁止发布关键字)
							</div>
						</div>

						<div class="btn-group btn-group-or">
							<a href="{$do_edit_url}" class="btnlg mb ajaxproxy"
								proxy='{"method":"post", "location":"{$index_url}"}'>提交保存</a>

						</div>
					</form><!-- content add form -->
				</div>
			</div><!-- end of inner -->
		</section>
	</div>
</div>
{include admin.inc.footer}

<!--tmpl-script-->

<!-- assocalert -->
<script id="admin_role-assoc-box" type="text/html">
<div class="assoc-alertbox">
	<div class="searchbar">
		<form class="assoc-foreign-form form-inline">
			<!--tmpl-search-->

			<!-- searchinput -->
			<div class="form-group">
				<div class="input-group">
					<div class="input-group-addon">
						角色名称
					</div>
					<input type="text" class="form-control input-sm" maxlength="50" placeholder="" name="s_name" value="{$s_name}">
				</div>
			</div>
			<input type="hidden" name="order" value="{$order}">
			<input type="btn" class="btn btn-sm btn-success assoc-search-btn" value="搜索"/>
		</form>
	</div>
	<div class="content">
	
	</div>
	<div class="paginate">

	</div>
</div>
</script>

<!-- assoclist -->
<script id="admin_role-assoc-tablelist" type="text/html">
<table class="table  table-condense">
	<tr>
		<th><input type="checkbox" id="assoc-selectall" ></th>
		<!--tmpl-th-->
		<th></th>
		<th></th>
		<th></th>
		<th></th>
		<th></th>
		<th></th>
		<th></th>
		<th>AppId</th>
	</tr>
	{[each items]}
	<tr>
		<td><input type="checkbox" name="assoc[]" value="{[$value.id]}"></td>
		<!--tmpl-td-->
		<td>{[$value.name]}</td>
		<td>{[$value.role_key]}</td>
		<td>{[$value.remark]}</td>
		<td>{[$value.addtime]}</td>
		<td>{[$value.edittime]}</td>
		<td>{[$value.admin_manager_id]}</td>
		<td>{[$value.del_status]}</td>
		<td>{[$value.app_id]}</td>
	</tr>
	{[/each]}
</table>
</script>



<!-- pagescript -->
<script type="text/javascript">
	seajs.use("admin/security_index",function (parameter){
		
		/**--tmpl-templatejavascript--**/
		
		<!--tmpl-templatejavascript-->

		parameter.admin_role_assoc_url="{$admin_role_assoc_url}";

		parameter.upload_url="{$upload_url}";
		parameter.image_search_url="{$image_search_url}";
		parameter.image_list_url="{$image_list_url}";
		
		parameter.init();		
	});
</script>


<script id="assocpage" type="text/html">
<div class="text-right">
	<ul class="pagination blog-pagination">
		<li><a class="assoc-page" data-page="{[prev]}" href="javascript:void(0);">上一页</a></li> 
		{[each pages]}
			<li ><a class="assoc-page" data-page="{[$value]}" {[if curr == $value]}class="active"{[/if]} href="javascript:void(0)">{[$value]}</a></li> 
		{[/each]}
		<li><a class="assoc-page" href="javascript:void(0);" data-page="{[nexts]}">下一页</a></li> 
	</ul>	
</div>
</script>

</body>
</html>
